<template>
  <view class="normal-login-container">
    <view class="item-wrap">
      <view class="lineBottom10">
        <uni-section title="车辆信息" type="line" />
      </view>

      <view style="margin: 8rpx 20rpx 8rpx 20rpx">
        <uni-forms ref="ruleForm" :model="ruleForm" labelWidth="auto">
          <uni-forms-item label="车牌号:">
            <text>{{ ruleForm.carNo || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="车架号:">
            <text>{{ ruleForm.vinNo || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="品牌:">
            <text>{{ ruleForm.brandName || '-' }}</text>
          </uni-forms-item>
          <uni-forms-item label="车系:">
            <text>{{ ruleForm.seriesName || '-' }}</text>
          </uni-forms-item>
          <uni-forms-item label="车型:">
            <text>{{ ruleForm.modelName || '-' }}</text>
          </uni-forms-item>
          <uni-forms-item label="车辆产权:">
            <text>{{ ruleForm.propertyRightName || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="登记日期:">
            <text>{{ ruleForm.registerTime || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="车龄:">
            <text>{{ ruleForm.carAge || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="排放标准:">
            <text>{{ ruleForm.environmentalStandards || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="燃油类型:">
            <text>{{ handleLabel(dict.type.fuel_type, ruleForm.fuelType) || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="排量:">
            <text>{{ ruleForm.liter || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="座位数:">
            <text>{{ ruleForm.seatNum || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="档位:">
            <text>{{ ruleForm.gearPosition || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="颜色:">
            <text>{{ ruleForm.exteriorColor || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="上三年出险金额(元):">
            <text>{{ ruleForm.accidentAmountThreeYears || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="指导价(元):">
            <text>{{ ruleForm.guidancePrice || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="采购价(元):">
            <text>{{ ruleForm.purchasePrice || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="初期残值(元):">
            <text>{{ ruleForm.initialResidualValue || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="公里数:">
            <text>{{ ruleForm.mileage || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="过户次数:">
            <text class="transferCount" />
            <text>{{ ruleForm.transferCount || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="车况等级:">
            <text>
              {{ handleLabel(dict.type.vehicle_condition_level_type, ruleForm.vehicleConditionLevel) || '-' }}
            </text>
          </uni-forms-item>

          <uni-forms-item label="车辆停放城市:">
            <text>{{ ruleForm.cityName || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="处置原因:">
            <text>{{ ruleForm.disposalReason || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="车辆异常:">
            <text>{{ ruleForm.vehicleStatus || '-' }}</text>
          </uni-forms-item>

          <uni-forms-item label="附件:">
            <image-common :disabled="true" v-model="ruleForm.attachment" />
          </uni-forms-item>
        </uni-forms>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: 'applyMessage', //申请信息
  dicts: ['vehicle_condition_level_type', 'fuel_type', 'car_nature'],
  props: {
    value: {
      type: Object,
      default: {},
    },
  },
  computed: {
    ruleForm: {
      get() {
        let that = this
        const proxy = new Proxy(that.value, {
          get(target, key) {
            return Reflect.get(target, key)
          },
        })
        return proxy
      },
    },
    handleLabel() {
      return function (arr, type) {
        let name = ''
        arr.map((v) => {
          if (type == v.value) {
            name = v.label
          }
        })
        return name
      }
    },
  },
  watch: {},
  data() {
    return {}
  },

  created() {},
  mounted() {},
  methods: {},
}
</script>

<style scoped lang=""></style>
